<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="https://www.thymeleaf.org" xml:lang="en">
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!--<link th:href="@{../layui/css/layui.css}" type="text/css" rel="stylesheet" />-->
    <link th:href="@{/css/shop.css}" type="text/css" rel="stylesheet"/>
    <link th:href="@{/layui/css/layui.css}"  rel="stylesheet" type="text/css" />
    <link th:href="@{/css/Sellerber.css}" type="text/css" rel="stylesheet"/>
    <link th:href="@{/css/bkg_ui.css}" type="text/css" rel="stylesheet"/>
    <link th:href="@{/font/css/font-awesome.min.css}" rel="stylesheet" type="text/css"/>


    <script th:src="@{/js/jquery-1.9.1.min.js}" type="text/javascript"></script>

    <script th:src="@{/js/Backgroundjs/feedback.js}" type="text/javascript"></script>



    <script th:src="@{/js/Sellerber.js}" type="text/javascript"></script>
    <script type="text/javascript" th:src="@{/js/jquery.cookie.js}"></script>
    <script th:src="@{/js/shopFrame.js}" type="text/javascript"></script>
    <script th:src="@{/js/layer/layer.js}" type="text/javascript"></script>
    <!--  <script th:src="@{/js/laydate/laydate.js}" type="text/javascript"></script>-->
    <script th:src="@{/js/dist/echarts.js}" type="text/javascript"></script>


    <!--[if lt IE 9]>
    <script th:src="@{/js/html5shiv.js}" type="text/javascript"></script>
    <script th:src="@{/js/respond.min.js}"></script>
    <script th:src="@{/js/css3-mediaqueries.js}" type="text/javascript"></script>
    <![endif]-->
    <title>评论</title>
</head>

<body>
<div class="margin" id="page_style">
    <div class="operation clearfix mb15 same_module">
        <form action="/Comment/getCommentList"/>
        <div id="zhi01" th:text="${commodityName}" style="display: none"></div>
        <div id="zhi02" th:text="${startDate}" style="display: none"></div>
        <div id="zhi03" th:text="${endDate}" style="display: none"></div>
        <div id="zhi04" th:text="${imgId}" style="display: none"></div>

            <ul class="choice_search">
                <li class="clearfix col-xs-1 col-lg-3 col-ms-4 ">
                    <label class="label_name ">商品名：</label>
                    <!--<input placeholder="商品名"  id="commodityName" name="commodityName" type="text" class="form-control col-xs-8 col-lg-8 col-ms-8">-->
                    <input id="commodityName" name="commodityName" type="text" class="form-control col-xs-8 col-lg-8 col-ms-8" th:value="${commodityName02}">
                </li>
                <li class="clearfix col-xs-1 col-lg-3 col-ms-4 ">
                    <label class="label_name col-xs-2 ">开始时间：&nbsp;&nbsp;</label>
                    <div class="col-xs-5">
                        <input type="text" class="layui-input" id="test1" placeholder="开始日" name="startDate">
                    </div>
                </li>
                <li class="clearfix col-xs-1 col-lg-3 col-ms-4 ">
                    <label class="label_name col-xs-2">结束时间：&nbsp;&nbsp;</label>
                    <div class="col-xs-5">
                        <input type="text" class="layui-input" id="test2" placeholder="结束日" name="endDate" >
                    </div>
                </li>
                <li class="clearfix col-xs-1 col-lg-3 col-ms-3 ">
                    <select name="imgId" class="margin-right l_f select_style" id="imgid">
                        <option value="">请选择：</option>
                        <option value="1">有图</option>
                        <option value="0">无图</option>
                    </select>
                    <button type="submit" class="btn button_btn bg-deep-blue" id="select"><i class="icon-search"></i>查询</button>
                </li>
            </ul>
        </form>
    </div>


    <div class="h_products_list clearfix " id="Sellerber">
        <div class="padding15 clearfix">
            <div class="operation clearfix mb15  searchs_style">
                <!--<span class="r_f">共：<b id="zongshu"><a th:text="${comments.totalElements}"></a></b>条</span>-->
                <input id="totalElements" type="hidden" th:value="${totalElements}"/>
                <input id="pageNo" type="hidden" th:value="${number}"/>
            </div>
            <div class=" datalist_show">
                <div class="datatable_height confirm">
                    <table class="table table_list table_striped table-bordered" id="sample-table">
                        <thead>
                        <tr>
                            <th width="70px">评论id</th>
                            <th width="150px">用户名</th>
                            <th width="150px">商品名</th>
                            <th width="">留言内容</th>
                            <th width="160px">时间</th>
                            <th width="90">点赞次数</th>
                            <th width="90">是否可见</th>
                            <th width="160">操作</th>
                        </tr>

                        </thead>
                        <tbody id="showTable">
                            <tr th:each="comment:${comments}">

                                <input id="userId" type="hidden" th:value="${comment.userId}"/>
                                <input id="commodityId01" type="hidden" th:value="${comment.commodityId}"/>

                                <td th:text="${comment.commentid}"></td>
                                <td th:text="${comment.userName}"></td>
                                <td th:text="${comment.commodityName}"></td>
                                <td>
                                    <a th:onclick="'javascript:zipinglun_view('+${comment.commentid}+')'" th:text="${comment.content}"></a>
                                </td>
                                <td th:text="${comment.commenttime}"></td>
                                <td th:text="${comment.likecount}"></td>
                                <label th:if="${comment.status==1}">
                                    <td  class='td-status'><span class='label label-success radius'>已显示</span></td>
                                    <td  class='td-manage'>
                                        <a th:onclick="'javascript:member_stop(this,'+${comment.commentid}+')'"  href='javascript:;' title='隐藏' shiro:hasPermission="user:deleteComment" class='btn btn-xs btn-status'>隐藏</a>
                                        <a href='javascript:;' title='图片信息' class='btn btn-xs  bg-deep-blue' th:onclick="'javascript:view_image('+ ${comment.imgid}+')'">图片详情</a>
                                    </td>
                                </label>
                                <label th:if="${comment.status==2}">
                                    <td  class='td-status'><span class='label label-default radius'>已隐藏</span></td>
                                    <td  class='td-manage'>
                                        <a th:onclick="'javascript:member_start(this,'+${comment.commentid}+')'"  href='javascript:;' title='显示' shiro:hasPermission="user:deleteComment"  class='btn btn-xs'>显示</a>
                                        <a href='javascript:;' title='图片信息' class='btn btn-xs  bg-deep-blue' th:onclick="'javascript:view_image('+ ${comment.imgid}+')'">图片详情</a>
                                    </td>
                                </label>
                            </tr>
                        </tbody>
                    </table>
                    <div id="this"></div>
                </div>
            </div>
        </div>
    </div>


</div>
<!--留言详细-->
<div id="Guestbook" style="display:none;overflow-y:auto; width:600px; height:610px; overflow:auto;">
    <table class="table table_list table_striped table-bordered">
        <thead>
            <tr>
                <th width="200px">评论id</th>
                <th width="200px">用户名</th>
                <th width="450px">留言内容</th>
                <th width="200px">是否可见</th>
            </tr>
        </thead>
        <tbody id="zipinglun">

        </tbody>

    </table>



</div>

<!--图片集-->
<div id="images" style="display: none"></div>


</body>
<script th:src="@{\layui\layui.js}" type="text/javascript"></script>
</html>
<script>
    //设置内页框架布局
    $(function () {
        $("#Sellerber").frame({
            float: 'left',//显示方向
            color_btn: '.skin_select',//按钮名称
            Sellerber_menu: '.list_content',//内容页
            page_content: '.list_show',//内容
            datalist: ".datatable_height",//数据列表高度取值
            header: 65,//顶部高度
            mwidth: 350,//宽度自定义
            minStatue: true,//隐藏或显示栏目

        });


    });

    /*用户-查看*/
    function member_show(title, url, id, w, h) {
        layer_show(title, url + '#?=' + id, w, h);
    }


    layui.use('laydate', function(){
        var laydate = layui.laydate

        //执行一个laydate实例
        laydate.render({
            elem: '#test1',
            type:'datetime'
        });
        laydate.render({
            elem: '#test2',
            type:'datetime'
        });
    });
</script>